<template>
  <div class="app-container">
    <el-tabs type="border-card" :value="activeTab" @tab-click="changeTab">
      <el-tab-pane label="系统域名检测" name="one">
        <system v-show="activeTab === 'one'" />
      </el-tab-pane>
      <el-tab-pane label="代理域名检测" name="two">
        <agency  v-show="activeTab === 'two'"/>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
  import system from "./system";
  import agency from "./agency";
  import {tabs} from '@/build'
  export default {
    name: "domain-test",
    mixins:[tabs],
    components:{
      system,
      agency
    },
    data() {
      return {
        activeTab:'one'
      }
    },
    mounted() {
      this.$store.dispatch(types.SAVE_OPERATION_LOG, {content: _.getContent(this.$route, '系统域名检测', true)});
    },
    methods: {
      changeTab(tab) {
        this.activeTab = tab.name
        //tab页记录访问日志
        this.$store.dispatch(types.SAVE_OPERATION_LOG, {content: _.getContent(this.$route, tab.label, true)});
      }
    },
  }
</script>

<style lang="scss" scoped>
</style>

